dxp-ux
Create Order - Add Line (TMF 622 POST)
This operation will create the AddLine Order in Salesforce
Note - To work this fucntionality, the field "@type" not empty and value should be equal to "AddLine" in request body
URL
https://[localhost]:[port]/dxp-ux/v1/{businessId}/productOrder
URL PARAMS
name | type | description | required |
---|---|---|---|
businessId | string | 2 letter ISO 3166 country code (TT, BB, JM, PA, PR etc.) identifying the business unit. | Y |
Header
name | value | description | required |
---|---|---|---|
client_id | string | The client_id identifying the channel. | Y |
client_secret | string | Password associated with the client_id. | Y |
X-Correlation-ID | string | Identifier that correlates HTTP request between a client and server. Any identification model (UUDI, checksum, etc.) can be used, as long as it is a unique value to differentiate a transaction. | Y |
cURL request
curl --location 'https://nonprod.esb.cloud.lla.com/dev/dxp-ux/dxp-ux/v1/PR/productOrder' \
--header 'X-Correlation-Id: 644e1dd7-2a7f-18fb-b8ed-ed78c3F92c2b' \
--header 'client_id: xxx' \
--header 'client_secret: yyy' \
--header 'Content-Type: application/json' \
--data-raw '{
"channel": [
{
"name": "Digital" //sourceSystem
}
],
"@type": "AddLine", //requestType
"description": "Add New Line", //reason
"externalId": "127280366378939", //sourceOrderId
"billingAccount": {
"id": "1231231-157657", //bancan
"name": "bancan",
"@type": "AccountRef"
},
"payment": [
{
"id": "24324243242" //transactionId
}
],
"productOrderItem": [
{
"product": {
"productCharacteristic": [
{
"name": "consents",
"valueType": "Object",
"value": {
"consentLanguage": "EN/ES", //consentLanguage
"consents": [
{
"type": "GeneralTnC", //type
"id": "GeneralTnC", //id
"consentTextVersion": "2", //consentTextVersion
"state": "Consented" //state
},
{
"type": "InsuranceConsent",
"id": "InsuranceConsent",
"consentTextVersion": "2",
"state": "Consented"
},
{
"type": "InstConsent",
"id": "InstConsent",
"consentTextVersion": "2",
"state": "Consented"
}
]
}
},
{
"name": "deliveryAddress",
"valueType": "Object",
"value": {
"street1": "11237 ", //street1
"street2": "CALLE JAZMIN", //street2
"city": "SANTA ISABEL", //city
"postalcode": "007573126", //postalcode
"state": "PR", //state
"country": "US", //country
"deliveryType": "Mail Delivery", //deliveryType
"deliverySpeed": "Standard" //deliverySpeed
}
},
{
"name": "lineDetails",
"valueType": "array",
"value": [
{
"lineNumber": "1", //lineNumber
"planDetails": {
"msisdn": "2432666644", //msisdn
"nokiaReservationId": "234234234", //nokiaReservationId
"planSku": "PR_B2C_ULT_Starter_MB_Line", //planSku
"simType": "Physical SIM/Dynamic SIM", //simType
"aliasFirstName": "John", //aliasFirstName
"aliasLastName": "Luis", //aliasLastName
"addOnDetails": [
{
"addonName": "Liberty International Passport", //addonName
"addonId": "PR_B2C_Mobile_IntRmg_Voice", //addonId
"attributeCode": "PR_B2C_Mb_ATT_Roaming_Add_On_Plan", //attributeCode
"attributeValue": "Internation Day Pass $10/day" //attributeValue
},
{
"addonName": "International Calling",
"addonId": "PR_B2C_Mobile_International_Calling",
"attributeCode": "PR_B2C_Mb_ATT_Voice_Add_On_Plan",
"attributeValue": "International calling Add-ons $10"
},
{
"addonName": "Liberty Home & Road Assistance",
"addonId": "PR_B2C_Liberty_Home_Roadside_Assistance",
"attributeCode": "PR_B2C_MB_ATT_Liberty_Assistance_Plan",
"attributeValue": "Liberty Home and Roadside Assistance"
}
]
},
"deviceDetails": {
"deviceSku": "106655", //deviceSku
"reservationId": "85299", //reservationId
"installments": true, //installments
"installmentDetails": {
"term": "12", //term
"frequencyAmount": "55", //frequencyAmount
"financedAmount": "550", //financedAmount
"downpayment": "100", //downpayment
"downpaymentTax": "10" //downpaymentTax
},
"quickUpgrade": false, //quickUpgrade
"insurance": "1", //insurance
"byod": true, //byod
"byodDetails": {
"imei": "141241414142141", //IMEI Number
"model": "iphone 15", //Device Model
"manufacturer": "Apple", //Device Manufaturer
"capacity": "256GB", //Device storage capacity
"color": "Gold" //Device color
}
}
}
]
},
{
"name": "creditDetails",
"valueType": "Object",
"value": {
"creditScore": "780", //creditScore
"creditSegment": "K", //creditSegment
"creditScoreDate": "2021-07-26" //creditScoreDate
}
},
{
"name": "PaymentDetails",
"valueType": "Object",
"value": {
"paymentCaptured": true //paymentCaptured
}
}
]
}
}
]
}'
Definitions
Each of the request parameters is detailed.
name | type (Lenght) | description | required |
---|---|---|---|
channel | array | A list of related channels | Y |
channel.name | string (20) | Source System information for tracking purpose | Y |
description | string (30) | reason, Eg: "Add New Line" | Y |
externalId | string (20) | a unique id of the order from the source system | Y |
billingAccount | objecct | Account reference. | Y |
billingAccount.id | string (30) | Account number | Y |
billingAccount.name | string | Name of the account, this is not passing to Salesforce | N |
billingAccount.@type | string | Reference type, this is not passing to Salesforce | N |
payment | array | payment info. Mandatory only if paymentCaptured is true | Y* |
payment.id | string (30) | Payment transactionId. Mandatory only if paymentCaptured is true | Y* |
@type | string (20) | request type information: Expected value will be: 'AddLine' Note- To work this functionality this type should be passed as 'AddLine' | Y |
productOrderItem | array | A list of product order items | Y |
productOrderItem.product | object | A product ref or value | Y |
productOrderItem.product.productCharacteristic | Array | Describes a given characteristic of an object or entity through a name/value pair. | Y |
productOrderItem.product.productCharacteristic.name | String | Name of the characteristic | Y |
productOrderItem.product.productCharacteristic.value | Object/Array | The value of the characteristic | Y |
productOrderItem.product.productCharacteristic.valueType | string | Value data type | N |
CONSENTS productCharacteristic values
characteristic name | type (Length) | description | required |
---|---|---|---|
consents | Array | Container for customer consents | Y* |
consentLanguage | string (10) | Language of the consents, Eg: EN or ES | Y* |
consents[].type | string (20) | Type of the consent | Y* |
consents[].id | string (20) | Id of the consent | Y* |
consents[].consentTextVersion | string (5) | version of the consent | Y* |
consents[].state | string (20) | state of the consent (Consented / Not Consented) | Y* |
Note: The consent object is mandatory if consents.type is "GeneralTnC" else optional
DELIVERY-ADDRESS productCharacteristic values
characteristic name | type (Length) | description | required |
---|---|---|---|
deliveryAddress | object | Delivery Address | Y |
street1 | string (50) | Street 1 of address | Y |
street2 | string (50) | Street 2 of address | N |
city | string (50) | City name | Y |
postalcode | string (50) | Postal code | Y |
state | string (50) | State code | Y |
country | string (50) | Country code | Y |
deliveryType | string (20) | must be 'Mail Delivery' | Y |
deliverySpeed | string (20) | must be 'Standard' | Y |
LINE-DETAILS productCharacteristic values
characteristic name | type (Length) | description | required |
---|---|---|---|
lineDetails | array | Details of each line including plan and device | Y |
lineNumber | string (5) | 1, 2,3 etc - its mandatory if lineDetails object is present | Y |
planDetails | object | Details of the plan | Y |
planDetails{}.msisdn | string (20) | Plan msisdn | Y |
planDetails{}.nokiaReservationId | string (30) | Nokia reservation id of the msisdn | Y |
planDetails{}.planSku | string (60) | The salesforce Product code | Y |
planDetails{}.simType | string (30) | Type of the sim | Y |
planDetails{}.aliasFirstName | string (50) | First name of the customer holding this line | Y |
planDetails{}.aliasLastName | string (50) | Last name of the customer holding this line | Y |
planDetails{}.addOnDetails | array | Add on details. Note - Minimum one object is mandatory if this addOnDetails array comes. | N |
planDetails{}.addOnDetails[].addonName | string (60) | add-on name | Y |
planDetails{}.addOnDetails[].addonId | string (60) | add-on unique code | Y |
planDetails{}.addOnDetails[].attributeCode | string (60) | attribute unique code | Y |
planDetails{}.addOnDetails[].attributeValue | string (60) | attribute value | Y |
deviceDetails | object | Device details | Y |
deviceDetails{}.deviceSku | string (20) | sku of the device | Y |
deviceDetails{}.reservationId | string (20) | SAP reservation id of the device | Y |
deviceDetails{}.installments | boolean | true or false | Y |
deviceDetails{}.quickUpgrade | boolean | true OR false | Y |
deviceDetails{}.insurance | string (20) | 1 OR 4 OR blank | N |
deviceDetails{}.byod | boolean | true OR false | N |
deviceDetails{}.byodDetails{} | object | BYOD details | N |
deviceDetails{}.byodDetails{}.imei | string | IMEI number of the device | N |
deviceDetails{}.byodDetails{}.model | string | Device Model | N |
deviceDetails{}.byodDetails{}.manufacturer | string | Device Manufacturer | N |
deviceDetails{}.byodDetails{}.capacity | string | Device storage capacity | N |
deviceDetails{}.byodDetails{}.color | string | Device color | N |
deviceDetails{}.installmentDetails | object | mandatory if Installments is true | Y* |
deviceDetails{}.installmentDetails{}.term | string (5) | The term of the installment | Y |
deviceDetails{}.installmentDetails{}.frequencyAmount | string (10) | The monthly installment amount | Y |
deviceDetails{}.installmentDetails{}.financedAmount | string (10) | Total financed amount | Y |
deviceDetails{}.installmentDetails{}.downpayment | string (10) | Down payment of the installment | Y |
deviceDetails{}.installmentDetails{}.downpaymentTax | string (10) | Tax of down payment | Y |
CREDIT-DETAILS productCharacteristic values
characteristic name | type (Length) | description | required |
---|---|---|---|
creditDetails | object | Credit info | N |
creditScore | string (10) | Credit score | N |
creditSegment | string (5) | credit Segment | N |
creditScoreDate | string (20) | Credit score captured date | N |
Note: All three credit check parameters together are mandatory OR all of them together optional.
PAYMENT-DETAILS productCharacteristic values
characteristic name | type (Length) | description | required |
---|---|---|---|
PaymentDetails | object | Payment info | Y |
paymentCaptured | boolean | Payment Captured (true OR false) | Y |
Possible response success
This section defines all the possible data structures received by the client and that must be considered satisfactory at the time of responding to the method.
[ 201 ]
Created - update request processed successfully, response body contains an entity corresponding to the requested resource.
{
"state": "acknowledged",
"note": [
{
"text": "Order request received Successfully"
}
]
}
Definitions
Each of the request parameters is detailed.
name | type | description | required |
---|---|---|---|
state | string | The state of the order | N |
note | array | Extra information about a given entity | N |
note[].text | string | Text of the note | N |
Possible response error
In this section all the possible data structures received by the client are defined and that must be considered as unsatisfactory when responding to the method.
[ 400 ]
{
"errors": [
{
"code": 400,
"message": "SF:POST_PRODUCTORDER",
"description": "Required parameters missing"
}
]
}
[ 401 ]
Unauthorized - The request has not been applied because it lacks valid authentication credentials for the target resource.
{
"errors": [
{
"code": 401,
"message": "The user could not be authenticated for this request.",
"description": "The request has not been applied because it lacks valid authentication credentials for the target resource"
}
]
}
[ 403 ]
Forbidden - Indicates that the server understood the request but refuses to fulfill it. If authentication credentials were provided in the request, the server considers them insufficient to grant access. The client SHOULD NOT automatically repeat the request with the same credentials. The client MAY repeat the request with new or different credentials.
[ 404 ]
Not Found - server has not found a resource with that URI. This may be temporary and permanent condition. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.
{
"errors": [
{
"code": 404,
"message": "The request is invalid or not properly formed.",
"description": "The requested operation failed because a resource associated with the request could not be found."
}
]
}
[ 405 ]
Method Not Allowed - HTTP method not allowed for this resource. The method specified in the Request-Line is not allowed for the resource identified by the Request-URI.
{
"errors": [
{
"code": 405,
"message": "APIKIT:METHOD_NOT_ALLOWED",
"description": "HTTP Method post not allowed for : /{businessId}/productOrder"
}
]
}
[ 429 ]
Too Many Requests - client has sent too many requests in a space of time (rate limiting). When a server is under attack or just receiving a very large number of requests from a single party, responding to each with a 429 status code will consume resources. Therefore, servers may drop connections or take other steps instead of responding with the 429 status code, when limiting resource usage.
{
"errors": [
{
"code": 429,
"message": "Too Many Requests.",
"description": "The requested operation failed because the client has sent too many requests in a given amount of time"
}
]
}
[ 500 ]
Internal Server Error - server encountered an error processing request. This should not happen normally, but it is a generic error message, given when no more specific message is suitable.
{
"errors": [
{
"code": 500,
"message": "The request failed due to an internal error.",
"description": ""
}
]
}
[ 501 ]
Not implemented - indicates that the server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource.
{
"errors": [
{
"code": 501,
"message": "Not implemented",
"description": "Operation POST /productOrder for Business Id: xxxx not implemented"
}
]
}
[ 502]
Bad Gateway - gateway is available but backend service is not. The server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill the request.
[ 503 ]
Service Unavailable - temporary maintenance of service, try again later. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the delay will be indicated in a Retry-After header. If no Retry-After is given, the client SHOULD handle the response as it would for a 500 response. Note: The existence of the 503 status code does not imply that a server will use it when becoming overloaded. Servers may simply refuse the connection.